<?php

namespace App\Providers;

use Illuminate\Support\Facades\DB;
use Encore\Admin\Config\Config;
use Illuminate\Support\ServiceProvider;
use App\Helper\Utils;


class AppServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Config::load();
        
        DB::listen(function ($query){

            $sql   = $query->sql;
            $bings = $query->bindings;
            $times = $query->time;
            // Utils::sqlLog($sql, $bings, $times);
        });
    }

    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
